package com.dailyblue.java.standard.design.观察者模式;

// 彩民--关注彩票的中奖结果
public class LotteryObServer implements ObServer {
    private int id;
    private Integer num = (int) (Math.random() * 100 + 1);

    public LotteryObServer(int id) {
        this.id = id;
    }

    @Override
    public void update(String message) {
        System.out.print(message + "\t");
        System.out.println("彩民" + id + "的号码是：" + num);
    }
}
